package com.example.aacwebdemo.es.one;

import com.example.aacwebdemo.es.core.annotation.ESDocument;
import com.example.aacwebdemo.es.core.annotation.ESField;
import com.example.aacwebdemo.es.core.annotation.ESFieldType;
import com.example.aacwebdemo.es.core.annotation.ESId;

/**
 * @author zhao.xin06679
 * @date 2021年06月24日 11:19
 */

@ESDocument(indexName = "goods")
public class GoodsESEntity {
    // 筛选条件包括：商品名称，品牌，规格，适用车型，商品编号，原厂编号

    /**
     * 主键,商品ID
     */
    @ESId
    @ESField(value = "goodsId",type = ESFieldType.Long)
    private Long goodsId;

    /**
     * 商品名称
     */
    @ESField(value = "goodsName",type = ESFieldType.Keyword)
    private String goodsName;
    /**
     * 品牌
     */
    @ESField(value = "goodBrand",type = ESFieldType.Keyword)
    private String goodBrand;
    /**
     * 规格
     */
    @ESField(value = "goodsSpec",type = ESFieldType.Keyword)
    private String goodsSpec;
    /**
     * 商品编号
     */
    @ESField(value = "goodsAccessoriesCode",type = ESFieldType.Keyword)
    private String goodsAccessoriesCode;
    /**
     * 原厂编号
     */
    @ESField(value = "goodsOriginalFactoryCode",type = ESFieldType.Keyword)
    private String goodsOriginalFactoryCode;

    /**
     * 复合字段，会被分词后存储, 暂时美哦与分词泪空，先不支持
     */
//    @ESField(value = "groupData",type = ESFieldType.Text,analyzer = "ik_smart")
    @ESField(value = "groupData",type = ESFieldType.Text)
    private String groupData;


    public Long getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Long goodsId) {
        this.goodsId = goodsId;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getGoodBrand() {
        return goodBrand;
    }

    public void setGoodBrand(String goodBrand) {
        this.goodBrand = goodBrand;
    }

    public String getGoodsSpec() {
        return goodsSpec;
    }

    public void setGoodsSpec(String goodsSpec) {
        this.goodsSpec = goodsSpec;
    }

    public String getGoodsAccessoriesCode() {
        return goodsAccessoriesCode;
    }

    public void setGoodsAccessoriesCode(String goodsAccessoriesCode) {
        this.goodsAccessoriesCode = goodsAccessoriesCode;
    }

    public String getGoodsOriginalFactoryCode() {
        return goodsOriginalFactoryCode;
    }

    public void setGoodsOriginalFactoryCode(String goodsOriginalFactoryCode) {
        this.goodsOriginalFactoryCode = goodsOriginalFactoryCode;
    }

    public String getGroupData() {
        return groupData;
    }

    public void setGroupData(String groupData) {
        this.groupData = groupData;
    }
}
